package com.ruoyi.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 统一组织机构对象 sis_sys_organ
 * 
 * @author ruoyi
 * @date 2024-03-22
 */
public class SisSysOrgan extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键标识 */
    private String objuid;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String appId;

    /** 组织机构所属上级机构ID */
    @Excel(name = "组织机构所属上级机构ID")
    private String pid;

    /** 组织机构编码 */
    @Excel(name = "组织机构编码")
    private String orgCode;

    /** 组织机构名称 */
    @Excel(name = "组织机构名称")
    private String orgName;

    /** 组织机构简称 */
    @Excel(name = "组织机构简称")
    private String orgShortName;

    /** 机构类型（0：单位，1：部门，2：岗位） */
    @Excel(name = "机构类型", readConverterExp = "0=：单位，1：部门，2：岗位")
    private Long orgType;

    /** 机构级别 0：国家，1：省（自治区、直辖市），2：市（地、州），3：县（区），4：下级单位，5：直属单位，6：部门，7：小组 */
    @Excel(name = "机构级别 0：国家，1：省", readConverterExp = "自=治区、直辖市")
    private Long orgLevel;

    /** 组织机构所属安全域 */
    @Excel(name = "组织机构所属安全域")
    private String orgDomain;

    /** 扩展字段 */
    @Excel(name = "扩展字段")
    private String extendXml;

    /** 最后修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastModifyTime;

    /** 加密证书 */
    @Excel(name = "加密证书")
    private String encryptCert;

    /** 签名证书 */
    @Excel(name = "签名证书")
    private String signCert;

    /** 描述 */
    @Excel(name = "描述")
    private String description;

    /** 序号 */
    @Excel(name = "序号")
    private Long sortnum;

    /** 是否启用（1：启用 0：不启用） */
    @Excel(name = "是否启用", readConverterExp = "1=：启用,0=：不启用")
    private Long isavailable;

    /** 是否删除 */
    @Excel(name = "是否删除")
    private Long isdelete;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String ip;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String orgDayTel;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String orgTel;

    /** 子部门 */
    List<SisSysOrgan> children = new ArrayList<>();

    public List<SisSysOrgan> getChildren() {
        return children;
    }

    public void setChildren(List<SisSysOrgan> children) {
        this.children = children;
    }

    public void setObjuid(String objuid)
    {
        this.objuid = objuid;
    }

    public String getObjuid() 
    {
        return objuid;
    }
    public void setAppId(String appId) 
    {
        this.appId = appId;
    }

    public String getAppId() 
    {
        return appId;
    }
    public void setPid(String pid) 
    {
        this.pid = pid;
    }

    public String getPid() 
    {
        return pid;
    }
    public void setOrgCode(String orgCode) 
    {
        this.orgCode = orgCode;
    }

    public String getOrgCode() 
    {
        return orgCode;
    }
    public void setOrgName(String orgName) 
    {
        this.orgName = orgName;
    }

    public String getOrgName() 
    {
        return orgName;
    }
    public void setOrgShortName(String orgShortName) 
    {
        this.orgShortName = orgShortName;
    }

    public String getOrgShortName() 
    {
        return orgShortName;
    }
    public void setOrgType(Long orgType) 
    {
        this.orgType = orgType;
    }

    public Long getOrgType() 
    {
        return orgType;
    }
    public void setOrgLevel(Long orgLevel) 
    {
        this.orgLevel = orgLevel;
    }

    public Long getOrgLevel() 
    {
        return orgLevel;
    }
    public void setOrgDomain(String orgDomain) 
    {
        this.orgDomain = orgDomain;
    }

    public String getOrgDomain() 
    {
        return orgDomain;
    }
    public void setExtendXml(String extendXml) 
    {
        this.extendXml = extendXml;
    }

    public String getExtendXml() 
    {
        return extendXml;
    }
    public void setLastModifyTime(Date lastModifyTime) 
    {
        this.lastModifyTime = lastModifyTime;
    }

    public Date getLastModifyTime() 
    {
        return lastModifyTime;
    }
    public void setEncryptCert(String encryptCert) 
    {
        this.encryptCert = encryptCert;
    }

    public String getEncryptCert() 
    {
        return encryptCert;
    }
    public void setSignCert(String signCert) 
    {
        this.signCert = signCert;
    }

    public String getSignCert() 
    {
        return signCert;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setSortnum(Long sortnum) 
    {
        this.sortnum = sortnum;
    }

    public Long getSortnum() 
    {
        return sortnum;
    }
    public void setIsavailable(Long isavailable) 
    {
        this.isavailable = isavailable;
    }

    public Long getIsavailable() 
    {
        return isavailable;
    }
    public void setIsdelete(Long isdelete) 
    {
        this.isdelete = isdelete;
    }

    public Long getIsdelete() 
    {
        return isdelete;
    }
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setOrgDayTel(String orgDayTel) 
    {
        this.orgDayTel = orgDayTel;
    }

    public String getOrgDayTel() 
    {
        return orgDayTel;
    }
    public void setOrgTel(String orgTel) 
    {
        this.orgTel = orgTel;
    }

    public String getOrgTel() 
    {
        return orgTel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("objuid", getObjuid())
            .append("appId", getAppId())
            .append("pid", getPid())
            .append("orgCode", getOrgCode())
            .append("orgName", getOrgName())
            .append("orgShortName", getOrgShortName())
            .append("orgType", getOrgType())
            .append("orgLevel", getOrgLevel())
            .append("orgDomain", getOrgDomain())
            .append("extendXml", getExtendXml())
            .append("createTime", getCreateTime())
            .append("lastModifyTime", getLastModifyTime())
            .append("encryptCert", getEncryptCert())
            .append("signCert", getSignCert())
            .append("description", getDescription())
            .append("sortnum", getSortnum())
            .append("isavailable", getIsavailable())
            .append("isdelete", getIsdelete())
            .append("ip", getIp())
            .append("orgDayTel", getOrgDayTel())
            .append("orgTel", getOrgTel())
            .toString();
    }
}
